1. The Field of the Invention
The present invention provides a method for reducing data error when a flash memory using a copy back command, and more particularly, to a method for reducing data errors when a flash memory storage device using a copy back command.
2. Description of Related Art
Flash memories are widely popular because of its advantageous characteristics, such as nonvolatile, shock proof, high memory density and the like. Among many portable devices, the flash memory has replaced the EEPROM or the memory which requires battery power for its operation. Because the semiconductor technology is mature, it is possible to increase both the storage density and transmission speed of the flash memory, and therefore of flash memory has gradually replaced the conventional storage media, such as the hard disk driver. Because of the advantageous characteristics of the flash memory, the flash memories are widely applied in flash memory storage device by many manufacturers. The flash memory storage device enables the user to readily input and retrieve data and thereby provides great convenience and advantages to the users compared to the conventional storage device, such as the hard disk. Accordingly, the flash memory storage device has become the mainstream of storage device and most demanding on the present market.
The above-mentioned flash memory storage device use a copy back command to process the data amendment of a block during the data transmission. FIG. 1 is a flowchart showing a conventional flash memory storage device while executing the copy back command. When a part of data of a block needs to be amended, the conventional flash memory storage device A locates a new block A2 for inputting a part of data which needs to be amended, and then copy the data from the old block A1, that need not be amended, into the new block A2 to complete the copy back command. However, data errors may occur while the flash memory storage device A uses the block to execute the copy back command and the amount of data errors may be beyond the detectable range.
For ensuring the correctness and completeness of the data in the flash memory storage device, some manufacturers developed an error correction rule to calculate the value of the error correction code. Thus, when the microprocessor demands data from the flash memory storage device, first, the value of the error correction code for one or plural existing error bytes is detected; the error correction rule corrects the bytes if one or more error bytes exist. However, the error correction rule in the conventional flash memory storage device cannot correct if the amount of data errors exceed beyond the data correction capacity. Therefore, during the data transmission, if the amount of data errors exceed beyond the data correction capacity, the block in which the data is located is treated as a bad block and the data transmission is disabled. This phenomenon would adversely affect the system stability and cause inconvenience to the users.
Therefore, to prevent data errors from occurring due to use of copy back command of the flash memory storage device, most of the manufacturers prefer to abandon the copy back command. However, to abandon the copy back command means loosing the advantage of faster data transmission as this command allows partial amendment of data in a block.
Therefore, it is highly desirable to resolve data error problems when the flash memory storage device using copy back command